PageInfo.register({
    "type": "Obj",
    "info": function () {

        var PageObj = {};

        PageObj.require = {
            "$": "jquery",
            "layui": "layui",
            "api": "/assets/js/components/common/data-api",
            "util": "/assets/js/components/common/common-util"
        };

        PageObj.page = function () {

            var FunUtil = {};
            var HtmUtil = {};
            var Page = {};




            Page.show = function () {
                var util = this.util;
				util.filter();
				
				
				HtmUtil.common4city = function(data){
					var buf = [];
					buf.push('        <div class="layui-form-item admin-company-area">                                                                                                   ');

                    buf.push('            <label class="layui-form-label">地区</label>   ');
                    buf.push('            <div class="layui-input-inline">                     ');
                    buf.push('              <select name="provinceOfCompanyCode" id="common-area-1" lay-filter="common-area-1">                              ');
                    buf.push('                <option value="">请选择省</option>               ');
                    
                    buf.push('              </select>                                          ');
                    buf.push('            </div>                                               ');
                    buf.push('            <div class="layui-input-inline">                     ');
                    buf.push('              <select name="cityOfCompanyCode" id="common-area-2" lay-filter="common-area-2">                              ');
                    buf.push('                <option value="">请选择市</option>               ');
                    
                    buf.push('              </select>                                          ');
                    buf.push('            </div>                                               ');
                    buf.push('            <div class="layui-input-inline">                     ');
                    buf.push('              <select name="locationOfCompanyCode" id="common-area-3" lay-filter="common-area-3">                              ');
                    buf.push('                <option value="">请选择县/区</option>            ');
                  
                    buf.push('              </select>                                          ');
                    buf.push('            </div>                                               ');
                    buf.push('        </div>                                                                                                                          ');
                 
					
					
					return buf.join("");
				};

                HtmUtil.common4position = function(data){
					var buf = [];
					buf.push('        <div class="layui-form-item admin-company-area">                                                                                                   ');

                    buf.push('            <label class="layui-form-label">地区</label>   ');
                    buf.push('            <div class="layui-input-inline">                     ');
                    buf.push('              <select name="workProvinceCode" id="common-area-1" lay-filter="common-area-1">                              ');
                    buf.push('                <option value="">请选择省</option>               ');
                    
                    buf.push('              </select>                                          ');
                    buf.push('            </div>                                               ');
                    buf.push('            <div class="layui-input-inline">                     ');
                    buf.push('              <select name="workCityCode" id="common-area-2" lay-filter="common-area-2">                              ');
                    buf.push('                <option value="">请选择市</option>               ');
                    
                    buf.push('              </select>                                          ');
                    buf.push('            </div>                                               ');
                    buf.push('            <div class="layui-input-inline">                     ');
                    buf.push('              <select name="workLocationCode" id="common-area-3" lay-filter="common-area-3">                              ');
                    buf.push('                <option value="">请选择县/区</option>            ');
                  
                    buf.push('              </select>                                          ');
                    buf.push('            </div>                                               ');
                    buf.push('        </div>                                                                                                                          ');
                 
					
					
					return buf.join("");
				};

                HtmUtil.table = function (data) {
                    var buf = [];
					
					if(!(data instanceof Array)) data = [];

                    for (var i = 0, len = data.length; i < len; i++) {

                        var obj = data[i];
						var iscan = (String.HasText(obj.isStop) && obj.isStop == 2 );
						
						var isHr = obj.contractor == 0;

                        buf.push('<tr>                                              ');

                        buf.push('    <td><img src="'+obj.thumbUrl+'" style="width: 50px;height: 50px;"/></td>                                                                                          ');
                        buf.push('    <td>' + obj.companyName + '</td>                                                                                          ');

                        buf.push('    <td><button class="layui-btn layui-btn-warm layui-btn-small admin-company-btn-position" data-id="'+obj.id+'">职位列表</button>  <button class="layui-btn layui-btn-warm layui-btn-small admin-company-btn-HR" data-id="'+obj.id+'">联系人列表</button>                                                                       ');
                        buf.push('    <td>' + FunUtil.memory["1001"][obj.companyType]  + '</td>                                                                                          ');
                        buf.push('    <td>' +FunUtil.memory["1002"][obj.financingType] + '</td>                                                                               ');
                        buf.push('    <td>' + (iscan  ? "启用" : "禁用")  + '</td>                                                                                   ');
                        buf.push('    <td>                                                                                                   ');
                        buf.push('        <button class="layui-btn layui-btn-small admin-company-btn-edit '+(iscan ? "": "layui-btn-disabled")+'" data-id="'+obj.id+'">编辑</button>                       ');
                        buf.push('        <button class="layui-btn layui-btn-warm layui-btn-small admin-company-btn-addposition '+((!iscan  || isHr )? "layui-btn-disabled": "")+'" data-id="'+obj.id+'"  >添加职位</button>      ');

                        buf.push('        <button class="layui-btn layui-btn-warm layui-btn-small admin-company-btn-addHR '+(iscan ? "": "layui-btn-disabled")+'" data-id="'+obj.id+'">添加联系人</button>      ');

                        buf.push('        <button class="layui-btn layui-btn-danger layui-btn-small admin-company-btn-forbid" data-id="'+obj.id+'"  data-isValid="'+((iscan ) ? 1 : 2) +'">'+(iscan ? "禁用" : "启用" )+'</button>    ');
                        buf.push('    </td>                                                                                                  ');
                        buf.push('</tr>                                                                                                      ');
                    }                return buf.join("");


                };
                HtmUtil.add = function (data) {
                    var buf = [];
                    buf.push('<div id="admin-company-add">                                                                                                              ');
                    buf.push('    <form class="layui-form" action="">                                                                                                 ');


                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">公司头像</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('             <img id="admin-company-add-img" style="float: left; width: 100px; height: 100px; margin-right: 10px;"/>   <input type="file" name="file" id="admin-company-add-pic" class="layui-upload-file">    ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');


                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">公司名称</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                <input type="text" name="companyName" lay-verify="required" class="layui-input">     ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');
                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">企业类型</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('              <select name="companyType" lay-filter="aihao" id="common-select-1001">    </select>   ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');

                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">行业类型</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('              <select name="industryType" lay-filter="aihao" id="common-select-1009">    </select>   ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');


                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">公司规模</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('              <select name="scale" lay-filter="aihao" id="common-select-1010">    </select>   ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');

                

                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">融资情况</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                <select name="financingType" lay-filter="aihao" id="common-select-1002">    </select>                                                       ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');
                    buf.push('                                                                                                                                        ');
                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">公司福利</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    /*buf.push('               <textarea  name="companyBenefit" placeholder="请输入内容" class="layui-textarea"></textarea>');
                    */
                    buf.push('               <textarea style="display:none"  id="admin-company-add-companyBenefit" name="companyBenefit"  placeholder="请输入内容" class="layui-textarea"></textarea>');
                    buf.push('               <div id="admin-company-add-companyBenefit-edit" class="common-edit"></div>')
                    

                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');
                    buf.push('                                                                                                                                        ');
                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">公司简介</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                   /* buf.push('               <textarea name="companySynopsis"  placeholder="请输入内容" class="layui-textarea"></textarea>');
                   */ 
                    buf.push('               <textarea style="display:none"  id="admin-company-add-companySynopsis" name="companySynopsis"  placeholder="请输入内容" class="layui-textarea"></textarea>');
                    buf.push('               <div id="admin-company-add-companySynopsis-edit" class="common-edit"></div>')
                    
                    
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');


                    buf.push(HtmUtil.common4city());
                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">详细地址</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('               <input type="text" name="companyDetailedAddress" lay-verify="required"    placeholder="" class="layui-input">    ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');



 				    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">创业公司</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                 <input type="radio" name="isStartUpCompany" value="1" title="是" checked="">                                                       ');
                    buf.push('                 <input type="radio" name="isStartUpCompany" value="2" title="否">                                                                  ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');
                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                <button class="layui-btn" lay-submit="" lay-filter="admin-company-add-btn">确定</button>                                            ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');
                    buf.push('    </form>                                                                                                                             ');
                    buf.push('</div>                                                                                                                                  ');
                    return buf.join("");
                };


                HtmUtil.update = function (data) {
                    var buf = [];

                    var obj = data.data

                    buf.push('<div id="admin-company-add">                                                                                                              ');
                    buf.push('    <form class="layui-form" action="">                                                                                                 ');

                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">公司头像</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('              <img id="admin-company-update-img" style="float: left; width: 100px; height: 100px; margin-right: 10px;" src="'+obj.thumbUrl+'"/> <input type="file" name="file" id="admin-company-update-pic" class="layui-upload-file">    ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');



                    buf.push('        <div class="layui-form-item" style="display:none">                                                                                                   ');
                    buf.push('            <label class="layui-form-label"></label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('               <input type="text" name="id" lay-verify="required"   placeholder="" class="layui-input" value="'+obj.id+'">    ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>');

                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">公司名称</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                <input type="text" name="companyName" lay-verify="required" class="layui-input" value="'+obj.companyName+'">     ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');
                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">企业类型</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('              <select name="companyType" lay-filter="aihao" id="common-select-1001"><option disabled value="'+obj.companyType+'">'+util.memory().companyType[obj.companyType]+'</option> <option value="1">民营</option> <option value="2">国企</option> <option value="3">外企</option> <option value="4">其他</option>    </select>   ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');
                    
                    
                    
                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">行业类型</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('              <select name="industryType" lay-filter="aihao" id="common-select-1009">    </select>   ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');


                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">公司规模</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('              <select name="scale" lay-filter="aihao" id="common-select-1010">    </select>   ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');



                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">融资情况</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                <select name="financingType" lay-filter="aihao" id="common-select-1002"> <option disabled value="'+obj.financingType+'">'+util.memory().financingType[obj.financingType]+'</option><option value="1">preA</option> <option value="2">A</option> <option value="3">A+</option> <option value="4">B</option> <option value="5">B+</option> <option value="6">无融资</option>    </select>                                                       ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');
                    buf.push('                                                                                                                                        ');
                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">公司福利</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    
                    buf.push('               <textarea style="display:none"  id="admin-company-update-companyBenefit" name="companyBenefit"  placeholder="请输入内容" class="layui-textarea"></textarea>');
                    buf.push('               <div id="admin-company-update-companyBenefit-edit" class="common-edit"></div>')
                   

                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');
                    buf.push('                                                                                                                                        ');
                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">公司简介</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    
                    buf.push('               <textarea style="display:none"  id="admin-company-update-companySynopsis" name="companySynopsis"  placeholder="请输入内容" class="layui-textarea"></textarea>');
                    buf.push('               <div id="admin-company-update-companySynopsis-edit" class="common-edit"></div>')
                   
                    
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');
                    buf.push(HtmUtil.common4city());
                    
                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">详细地址</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('               <input type="text" name="companyDetailedAddress" lay-verify="required"    placeholder="" class="layui-input" value="'+obj.companyDetailedAddress+'">    ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');



                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">创业公司</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                 <input type="radio" name="isStartUpCompany" value="1" title="是" '+(obj.isStartUpCompany == 1 ? "checked":"")+'>                                                       ');
                    buf.push('                 <input type="radio" name="isStartUpCompany" value="2" title="否" '+(obj.isStartUpCompany == 2 ? "checked":"")+'>                                                                  ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');
                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                <button class="layui-btn" lay-submit="" lay-filter="admin-company-update-btn">确定</button>                                            ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');
                    buf.push('    </form>                                                                                                                             ');
                    buf.push('</div>                                                                                                                                  ');
                    return buf.join("");
                };



                HtmUtil.addPosition = function (data) {
                    var buf = [];
                    buf.push('<div id="admin-company-add">                                                                                                              ');
                    buf.push('    <form class="layui-form" action="">                                                                                                 ');
                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">职位名称</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                <input type="text" name="positionName" lay-verify="required" class="layui-input">     ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');
                    
                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">招聘人数</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                <input type="number" min="1" name="recruitingNumbers" lay-verify="required" class="layui-input">     ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');
                    
                    
                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">薪水范围</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('              <div class="layui-input-inline" style="width: 100px;"> <input type="number" min=1  name="lowSalary"  id="admin-company-add-position-lowSalary" placeholder="k"   class="layui-input"> </div> <div class="layui-form-mid">-</div> <div class="layui-input-inline" style="width: 100px;"> <input  type="number"  id="admin-company-add-position-highSalary"  name="highSalary" placeholder="k"   class="layui-input"> </div>  <div class="layui-input-block admin-company-input-checkbox"> <input type="checkbox" name="isDiscussPersonally" lay-filter="admin-company-add-position-isDiscussPersonally" lay-skin="primary" title="面议"  >  </div>  ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');

                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">职位类型</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('               <select name="positionType" id="common-select-1004">  <option value="1">全职</option><option value="2">兼职</option><option value="3">实习</option>    </select>    ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');

                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label" >学历要求</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('               <select name="qualificationsType" id="common-select-1005">   <option value="1">高中</option> <option value="2">大专</option> <option value="3">本科</option> <option value="4">硕士</option> <option value="5">博士</option> <option value="6">其他</option> <option value="7">不限</option>   </select>      ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');

 
                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">经验要求</label>                                                                                ');
                    buf.push('            <div class="layui-input-block ">                                                                                             ');
                    buf.push('               <select name="lowWorkingLife" id="common-select-1008" ></select>  ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');
                    
                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">专场类型</label>                                                                                ');
                    buf.push('            <div class="layui-input-block ">                                                                                             ');
                    buf.push('               <select name="specialPerformanceType" id="common-select-1013" ></select>  ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');
                    
                    
                    



                 /*   buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">工作地址</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('               <textarea  name="companyBenefit" placeholder="请输入内容" class="layui-textarea"></textarea>');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');
*/

                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">职责描述</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('               <textarea style="display:none"  id="admin-company-addPosition-positionDesc" name="positionDesc"  placeholder="请输入内容" class="layui-textarea"></textarea>');
                    buf.push('               <div id="admin-company-addPosition-positionDesc-edit" class="common-edit"></div>')
                    
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');

                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">任职要求</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('               <textarea style="display:none"  id="admin-company-addPosition-positionRequirements" name="positionRequirements"  placeholder="请输入内容" class="layui-textarea"></textarea>');
                    buf.push('               <div id="admin-company-addPosition-positionRequirements-edit" class="common-edit"></div>')
                    
                    
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');


                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">职位有效期</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                <input class="layui-input" name="positionDeadline" placeholder="月" lay-verify="required" type="number" min=1>');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');
                    
                    buf.push('<div id="admin-company-addposition-area1">');
                    
				    buf.push(HtmUtil.common4city());
				    
				    
				    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">详细地址</label>                                                                                ');
                    buf.push('            <div class="layui-input-block ">                                                                                             ');
                    buf.push('               <input name="positionDetailAddress" class="layui-input" lay-verify="required" />  ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');
                    buf.push("</div>")

				    
                    // buf.push('        <div class="layui-form-item">                                                                                                   ');
                    // buf.push('            <label class="layui-form-label">公司地址一致</label>                                                                                ');
                    // buf.push('            <div class="layui-input-block">                                                                                             ');
                    // buf.push('                 <input type="radio" name="isStartUpCompany" id="admin-company-addposition-company1" value="1" title="是" checked="">                                                       ');
                    // buf.push('                 <input type="radio" name="isStartUpCompany" id="admin-company-addposition-company2" value="2" title="否">                                                                  ');
                    // buf.push('            </div>                                                                                                                      ');
                    // buf.push('        </div>                                                                                                                          ');


                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">HR</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                 <select name="companyContractorId" lay-filter="aihao" id="common-hr-list">    </select>    ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>')




                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                <button class="layui-btn" lay-submit="" lay-filter="admin-company-addposition-btn">确定</button>                                            ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');
                    buf.push('    </form>                                                                                                                             ');
                    buf.push('</div>                                                                                                                                  ');
                    return buf.join("");
                };


                HtmUtil.updatePosition = function (data) {
                    console.log(data);

                    var obj = data.data;

                    console.log(obj);
                    var buf = [];
                    buf.push('<div id="admin-company-add">                                                                                                              ');
                    buf.push('    <form class="layui-form" action="">                                                                                                 ');

                    buf.push('        <div class="layui-form-item" style="display:none">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">职位名称</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                <input type="text" name="id" lay-verify="required" class="layui-input" value="'+obj.id+'">     ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');
                    
                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">招聘人数</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                <input type="number"  min="1" name="recruitingNumbers"  lay-verify="required" value="'+obj.recruitingNumbers+'" class="layui-input">     ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');
                    


                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">职位名称</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                <input type="text" name="positionName" lay-verify="required" class="layui-input" value="'+obj.positionName+'">     ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');
                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">薪水范围</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('              <div class="layui-input-inline" style="width: 100px;"> <input  type="number" min=1  name="lowSalary" '+(obj.isDiscussPersonally == 1 ? "disabled":"")+'  id="admin-company-add-position-lowSalary" placeholder="k"     '+(obj.isDiscussPersonally == 1 ? "disabled":"")+' class="layui-input" value="'+obj.lowSalary+'">    </div>                    <div class="layui-form-mid">-</div>                    <div class="layui-input-inline" style="width: 100px;"> <input  type="number" min=1   name="highSalary" id="admin-company-add-position-highSalary" placeholder="k"     class="layui-input" value="'+obj.highSalary+'"  '+(obj.isDiscussPersonally == 1 ? "disabled":"")+'>   </div>  <div class="layui-input-block admin-company-input-checkbox"> <input type="checkbox" name="isDiscussPersonally" lay-skin="primary" lay-filter="admin-company-add-position-isDiscussPersonally" title="面议" '+(obj.isDiscussPersonally == 1 ? "checked":"")+' >  </div>  ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');

                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">职位类型</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('               <select name="positionType" lay-filter="aihao" id="common-select-1004">  <option value="1">全职</option><option value="2">兼职</option><option value="3">实习</option>    </select>    ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');

					
					
					

					
                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">学历要求</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('               <select name="qualificationsType" lay-filter="aihao"  id="common-select-1005">   <option value="1">高中</option> <option value="2">大专</option> <option value="3">本科</option> <option value="4">硕士</option> <option value="5">博士</option> <option value="6">其他</option> <option value="7">不限</option>   </select>      ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');


                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">经验要求</label>                                                                                ');
                    buf.push('            <div class="layui-input-block common-select-1008">                                                                                             ');
                    buf.push('                <select name="lowWorkingLife"   id="common-select-1008"></select>    ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');
                    
                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">专场类型</label>                                                                                ');
                    buf.push('            <div class="layui-input-block ">                                                                                             ');
                    buf.push('               <select name="specialPerformanceType" id="common-select-1013" ></select>  ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');
                   


                    /*   buf.push('        <div class="layui-form-item">                                                                                                   ');
                       buf.push('            <label class="layui-form-label">工作地址</label>                                                                                ');
                       buf.push('            <div class="layui-input-block">                                                                                             ');
                       buf.push('               <textarea  name="companyBenefit" placeholder="请输入内容" class="layui-textarea" value="'+obj.companyBenefit+'"></textarea>');
                       buf.push('            </div>                                                                                                                      ');
                       buf.push('        </div>                                                                                                                          ');
   */

                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">职责描述</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    
                    buf.push('               <textarea style="display:none"  id="admin-company-updatePosition-positionDesc" name="positionDesc"  placeholder="请输入内容" class="layui-textarea">'+obj.positionDesc+'</textarea>');
                    buf.push('               <div id="admin-company-updatePosition-positionDesc-edit" class="common-edit"></div>')
                    
                    
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');

                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">任职要求</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    
                    buf.push('               <textarea style="display:none"  id="admin-company-updatePosition-positionRequirements" name="positionDesc"  placeholder="请输入内容" class="layui-textarea"></textarea>');
                    buf.push('               <div id="admin-company-updatePosition-positionRequirements-edit" class="common-edit"></div>')
                    
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');


                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">职位有效期</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                <input type="number" class="layui-input" name="positionDeadline" lay-verify="required|number" placeholder=""  value="'+obj.positionDeadline+'">  ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');

                    buf.push(HtmUtil.common4position());
                    
                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">详细地址</label>                                                                                ');
                    buf.push('            <div class="layui-input-block ">                                                                                             ');
                    buf.push('               <input name="positionDetailAddress" class="layui-input" lay-verify="required" value="'+obj.positionDetailAddress+'" />  ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');

                    
                    // buf.push('        <div class="layui-form-item" style="display:none">                                                                                                   ');
                    // buf.push('            <label class="layui-form-label">公司地址一致</label>                                                                                ');
                    // buf.push('            <div class="layui-input-block">                                                                                             ');
                    // buf.push('                 <input type="radio" name="isStartUpCompany" value="1" title="是" checked="">                                                       ');
                    // buf.push('                 <input type="radio" name="isStartUpCompany" value="2" title="否">                                                                  ');
                    // buf.push('            </div>                                                                                                                      ');
                    // buf.push('        </div>                                                                                                                          ');


                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">HR</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                 <select name="companyContractorId" lay-filter="aihao" id="common-hr-list">   </select>    ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>')




                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                <button class="layui-btn" lay-submit="" lay-filter="admin-company-updateposition-btn">确定</button>                                            ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');
                    buf.push('    </form>                                                                                                                             ');
                    buf.push('</div>                                                                                                                                  ');
                    return buf.join("");
                };


                HtmUtil.tablePosition = function (data) {
                    var buf = [];

                    var item = data.results;

                 //   buf.push('<div class="admin-company-add-model-concole"> <button class="layui-btn" lay-submit="" lay-filter="admin-company-add-btn">添加职位</button> </div>                  ');
                    buf.push('<table class="layui-table">                  ');
                    buf.push('  <colgroup>                                 ');
                    buf.push('    <col width="150">                        ');
                    buf.push('    <col width="150">                        ');
                    buf.push('	  <col width="150">                          ');
                    buf.push('    <col width="200">                        ');
                    buf.push('	  <col width="200">                          ');
                    buf.push('    <col width="200">                                    ');
                    buf.push('    <col width="200">                                    ');
                    buf.push('    <col width="200">                                    ');
                    buf.push('  </colgroup>                                ');
                    buf.push('  <thead>                                    ');
                    buf.push('    <tr>                                     ');
                     buf.push('      <th>职位编号</th>                      ');
                    buf.push('      <th>职位名称</th>                      ');
                    buf.push('      <th>职位类型</th>                      ');
                    buf.push('     <th>专场类型</th>                      ');
                    buf.push('      <th>创建时间</th>                      ');
                    
                    buf.push('      <th>地址</th>                      ');
                    buf.push('      <th>状态</th>                          ');
                    buf.push('      <th>操作</th>     ');/* 操作（添加 、禁用，修改）*/
                    buf.push('	  </tr>                                    ');
                    buf.push('  </thead>                                   ');
                    buf.push('  <tbody id="admin-company-addposition-tbody">                                    ');


                    buf.push(HtmUtil.tablePositionRow(item));


                    buf.push(' </tbody>                                    ');
                    buf.push('</table>                                     ');
                    return buf.join("");
                };
				
				
				HtmUtil.tablePositionRow = function(data){
					 var buf = [];
					 console.log(data);
					 
					 for(var i = 0,len = data.length;i<len;i++){
                        var obj = data[i];
                        buf.push('    <tr>                                     ');
                        buf.push('     <td>'+obj.positionNumber+'</td>                               ');
                        buf.push('     <td>'+obj.positionName+'</td>                               ');
                        buf.push('     <td>'+FunUtil.memory["1004"][obj.positionType]+'</td>                               ');
                        buf.push('     <td>'+FunUtil.memory["1013"][obj.specialPerformanceType]+'</td>                               ');
                        buf.push('     <td>'+(new Date(obj.serverCreateDate).Format("yyyy-MM-dd hh:mm:ss"))+'</td>                               ');
                        buf.push('     <td>'+obj.positionDetailAddress+'</td>                               ');
                        buf.push('     <td>'+(String.HasText(obj.isDisable) && obj.isDisable == 1 ? "启用" : "禁用")+'</td>                               ');
                        buf.push('     <td>  <button class="layui-btn layui-btn-warm layui-btn-small admin-company-addposition-edit-btn '+(String.HasText(obj.isDisable) && obj.isDisable == 1 ? "" : "layui-btn-disabled")+'"    data-id="'+obj.id+'"  lay-filter="admin-company-addposition-edit-btn">修改</button>  <button class="layui-btn layui-btn-warm layui-btn-small admin-company-addposition-status-btn"  data-isDisable="'+obj.isDisable+'" data-id="'+obj.id+'"  lay-filter="admin-company-addposition-status-btn">'+(String.HasText(obj.isDisable) && obj.isDisable == 1 ? "禁用" : "启用")+'</button></td>                               ');
                        buf.push('    </tr>                                    ');
                    }

					return buf.join("");
					
				};





                HtmUtil.tableHr = function (data) {
                    var buf = [];

                    var item = data.data;


                    buf.push('<table class="layui-table">                  ');
                    buf.push('  <colgroup>                                 ');
                    buf.push('    <col width="150">                        ');
                    buf.push('	  <col width="150">                          ');
                    buf.push('    <col width="150">                        ');
                    buf.push('    <col width="150">                        ');
					buf.push('    <col width="50">                        ');

                    buf.push('    <col width="200">                                  ');
                    buf.push('  </colgroup>                                ');
                    buf.push('  <thead>                                    ');
                    buf.push('    <tr>                                     ');
                    buf.push('      <th>电话</th>                      ');
                    buf.push('      <th>姓名</th>                      ');
                    buf.push('      <th>微信ID</th>                      ');
                    buf.push('      <th>投递邮箱</th>                      ');

                    buf.push('      <th>HR</th>                          ');
                    buf.push('      <th>操作</th>     ');/* 操作（添加 、禁用，修改）*/
                    buf.push('	  </tr>                                    ');
                    buf.push('  </thead>                                   ');
                    buf.push('  <tbody id="admin-company-addhr-tbody">                                    ');
                   

                    buf.push(HtmUtil.tableHrRow(item));

                     
                    buf.push(' </tbody>                                    ');
                    buf.push('</table>                                     ');
                    return buf.join("");
                };
				
				
				HtmUtil.tableHrRow = function(item){
					 var buf = [];
					 
					 
					 for(var i = 0,len = item.length;i<len;i++){
                        var obj = item[i];
						buf.push('    <tr>                                     ');
                        buf.push('     <td>'+obj.contractorPhone+'</td>                               ');
                        buf.push('     <td>'+obj.contractorName+'</td>                               ');
                        buf.push('     <td>'+obj.contractorWeChat+'</td>                               ');
                        buf.push('     <td>'+obj.contractorEmail+'</td>                               ');
                        buf.push('     <td>'+(String.HasText(obj.isHr) && obj.isHr == 1 ? "是" : "否")+'</td>                               ');

                        buf.push('     <td>  <button class="layui-btn layui-btn-small admin-company-hr-edit-btn"  data-id="'+obj.id+'"  lay-filter="admin-company-addposition-edit-btn">修改</button>  <button class="layui-btn layui-btn-small admin-company-hr-del-btn"  data-id="'+obj.id+'"  lay-filter="admin-company-addposition-edit-btn">删除</button></td>                               ');
                        buf.push('    </tr>                                     ');                   
				   }

					return buf.join("");
					
				};



                HtmUtil.addHR = function (data) {
                    var buf = [];
                    buf.push('<div id="admin-company-add">                                                                                                              ');
                    buf.push('    <form class="layui-form" action="">                                                                                                 ');
                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">电话</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                <input type="text" name="contractorPhone" lay-verify="required|phone"  autocomplete="off" placeholder="" class="layui-input">     ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');



                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">姓名</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                <input type="text" name="contractorName" lay-verify="required" autocomplete="off" placeholder="" class="layui-input">     ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');


                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">微信ID</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                <input type="text" name="contractorWeChat"lay-verify="required"  autocomplete="off" placeholder="" class="layui-input">     ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');


                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">邮箱</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                <input type="text" name="contractorEmail" lay-verify="required|email"  autocomplete="off" placeholder="" class="layui-input">     ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');


                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">是否为HR</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                <input type="radio" name="isHr" value="1" title="是" checked>    <input type="radio" name="isHr" value="2" title="否" >');

                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');



                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                <button class="layui-btn" lay-submit="" lay-filter="admin-company-addHR-btn">确定</button>                                            ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');
                    buf.push('    </form>                                                                                                                             ');
                    buf.push('</div>                                                                                                                                  ');
                    return buf.join("");
                };


                HtmUtil.updateHR = function (data) {
                    var buf = [];

                    console.log(data);
                    var obj = data.data;
                    buf.push('<div id="admin-company-add">                                                                                                              ');


                    buf.push('    <form class="layui-form" action="">                                                                                                 ');
                    buf.push('        <div class="layui-form-item" style="display:none">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">id</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                <input type="text" name="id" lay-verify="required" autocomplete="off" placeholder="" class="layui-input" value="'+obj.id+'">     ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');



                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">电话</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                <input type="text" name="contractorPhone" lay-verify="required|phone" class="layui-input" value="'+obj.contractorPhone+'">     ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');



                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">姓名</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                <input type="text" name="contractorName" lay-verify="required" class="layui-input" value="'+obj.contractorName+'">     ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');


                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">微信ID</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                <input type="text" name="contractorWeChat" lay-verify="required" class="layui-input" value="'+obj.contractorWeChat+'">     ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');


                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">邮箱</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                <input type="text" name="contractorEmail" lay-verify="required|email" autocomplete="off" placeholder="" class="layui-input" value="'+obj.contractorEmail+'">     ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');


                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <label class="layui-form-label">是否为HR</label>                                                                                ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                <input type="radio" name="isHr" value="1" title="是" checked>    <input type="radio" name="isHr" value="2" title="否" >');

                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');



                    buf.push('        <div class="layui-form-item">                                                                                                   ');
                    buf.push('            <div class="layui-input-block">                                                                                             ');
                    buf.push('                <button class="layui-btn" lay-submit="" lay-filter="admin-company-updateHR-btn">确定</button>                                            ');
                    buf.push('            </div>                                                                                                                      ');
                    buf.push('        </div>                                                                                                                          ');
                    buf.push('    </form>                                                                                                                             ');
                    buf.push('</div>                                                                                                                                  ');
                    return buf.join("");
                };


                //===============================
                var request = this.api;
                var util = this.util;
                




 
                var $query = $("#admin-company-query-btn");

                var Help = {

                    data: {
                        tableData:[],
                        activityRow:{},
                        totalPage:0,
                        isStart:false,
                        form:{
                            "pageNo": 1,
                            "pageSize": 5,
                        },
                        memory:{
                        	"1001":{
                        		
                        	},
                        	"1002":{
                        		
                        	}
                        	
                        },
						layparam:"",
                    },
                    util4hr:function(data){
                    	var $this  = this;
                    	var $hr = document.getElementById("common-hr-list"); 
                    	
                        request.ntqCompanyContactor.query({"id":data.id,"pageSize":1000, "pageNum":1}, function (cdata) {                    	
                    	    $hr.innerHTML = util.selectBuffer({"list":cdata.data,"key":data.key,"type":"hr"});
                            util.layout(function(cparam){
                            	data.callback();
                            });
                        
                        });
                    	
                    },
                    util4num:function(value){
                    	
                    },
                    util4city:function(qdata){
                    	var $this  = this;
                    	var $area1 = document.getElementById("common-area-1"); 
						var $area2 = document.getElementById("common-area-2"); 
						var $area3 = document.getElementById("common-area-3"); 
                    	
                    	
                    	var execuFun = {};
                    	
                    	execuFun.request = function(data){
                    		request.ntqProvider.getArea(data.param, function (cdata) {
							   data.callback(cdata);
							});
                    	};
                    	
                    	execuFun.change = function(data){
                    		var parentCode = "0";
								    			
							if(String.HasText(data.code))  parentCode= data.code;
							
							if(data.type  == 1){
								
								execuFun.request({"param":{"parentCode":parentCode,"level":1},"callback":function(ddata){
								    		
							    	$area1.innerHTML  =  util.selectBuffer({"list":ddata.data,"type":"tt","key":qdata.province});
							    	
							    	var scode = String.HasText(qdata.province) ? qdata.province : ddata.data[0].code; 
							    	
							    	execuFun.request({"param":{"parentCode":scode,"level":2},"callback":function(fdata){
							         
							        	$area2.innerHTML  =  util.selectBuffer({"list":fdata.data,"type":"tt","key":qdata.city});
							    		var ecode = String.HasText(qdata.city) ? qdata.city : fdata.data[0].code; 
							    		execuFun.request({"param":{"parentCode":ecode,"level":3},"callback":function(gdata){
							            	$area3.innerHTML  =  util.selectBuffer({"list":gdata.data,"type":"tt","key":qdata.area});
							    			if(String.HasText(data.callback)) data.callback();
							            }});
							        }});
							    	 
							    }});
								
							}else if(data.type == 2) {
								  
							    	execuFun.request({"param":{"parentCode":parentCode,"level":2},"callback":function(fdata){
							         
							        	$area2.innerHTML  =  util.selectBuffer({"list":fdata.data,"type":"tt","key":qdata.city});
							    		
							    		execuFun.request({"param":{"parentCode":fdata.data[0].code,"level":3},"callback":function(gdata){
							             
							            	$area3.innerHTML  =  util.selectBuffer({"list":gdata.data,"type":"tt","key":qdata.area});
							    			
							    			if(String.HasText(data.callback)){data.callback()};
							            	 
							            }});
							        	 
							        }});
							     
								
							}else{
								execuFun.request({"param":{"parentCode":parentCode,"level":3},"callback":function(gdata){
							     
							    	$area3.innerHTML  =  util.selectBuffer({"list":gdata.data,"type":"tt","key":qdata.area});
							    	
							    	if(String.HasText(data.callback)){data.callback()};
							    	 
							    }});
							}
                    	};
                    	
                    	execuFun.start = function(tdata){
                    		
                            execuFun.change({"code":tdata.code,"type":tdata.type,"callback":function(){
                            	
                            	util.layout(function(cparam){
                                	
                                	cparam.form.on('select(common-area-1)',function(data){
                                		 execuFun.start({"code":(data.value),"type":2});
                                	});
                            		cparam.form.on('select(common-area-2)',function(data){
                                		 execuFun.start({"code":(data.value),"type":3});
                                	});
                                
                                   qdata.callback(cparam);
                                }); 
                            }});
                    	};
                    	execuFun.start({"code":0,"type":1});

                    },

                    fun4start: function () {
                        var $this = this;
                        //addUser
                        //设置memeory
                        
                                          

                        $("#admin-company-add-user-btn").unbind("click").bind("click", function () {
                        	if($("#admin-company-add").length > 0) return;
                        	
                        	var hasrequest = false;
                            layer.open({ type: 1, content: HtmUtil.add(""), area: ['480px', '600px'],  skin: 'layui-layer-demo', success: function (layero, index) {
                                    
                                    //渲染 城市下拉框
                                   var $type = document.getElementById("common-select-1001");
                                   var $ront   = document.getElementById("common-select-1002");
                                   
                                   var $htype   = document.getElementById("common-select-1009");
                                   var $scale   = document.getElementById("common-select-1010");
                                   
                                   
                                   
                                   $this.util4city({"province":"","city":"","area":"","callback":function(cparam){ }});
                    	
                                    	var nlist = [];
                                    	for(var i =0,len = FunUtil.memory['data'].length;i<len;i++){ var sobj = FunUtil.memory['data'][i]; if(sobj.dictdataName != "全部") nlist.push(sobj); }
                                    	
                                    	$type.innerHTML = util.selectBuffer({"list":nlist,"key":"1001"});
                                    	$ront.innerHTML = util.selectBuffer({"list":FunUtil.memory['data'],"key":"1002"});
                                    	$htype.innerHTML= util.selectBuffer({"list":FunUtil.memory['data'],"key":"1009"});
                                    	$scale.innerHTML= util.selectBuffer({"list":FunUtil.memory['data'],"key":"1010"});
                                    	
                                    	util.editer({"id":"admin-company-add-companyBenefit"});
										util.editer({"id":"admin-company-add-companySynopsis"})
										
                                    	
                                    	util.layout(function(cparam){
                                    	    var ind = "";
                                    	    console.log(request.ntqProvider.ntqUpload(),999)
                                            var shortUrl = "";
                                           var $img =  document.getElementById("admin-company-add-img");
                                            $img.style.display="none";
                                            cparam.upload({
                                                elem:"#admin-company-add-pic",
                                                url: request.ntqProvider.ntqUpload(), //上传接口
                                                success: function(res){ //上传成功后的回调
                                                    shortUrl = res.data.shortUrl;
                                                    $img.style.display="block";
                                                    $img.setAttribute("src",shortUrl);
                                                    console.log(shortUrl)
                                                }
                                            });


                                         cparam.form.on('submit(admin-company-add-btn)', function (data) {
                                         	 
                                         	 if(hasrequest) return;
                                         	 hasrequest = true;
                                             request.ntqCompany.add(Object.assign({thumbUrl:shortUrl},data.field), function (cdata) {
                                                 layer.close(index);
                                             })
                                             return false;
                                         });
                                        })
                                }
                            });
                        });
						
						util.layout(function(cparam){ 
						
						    $this.data.layparam = cparam;
							
							
							var $type = document.getElementById("admin-company-form-companyType");
							
							request.ntqProvider.getDictTypeCode({"dictTypeCode":"1001,1002,1004,1005,1008,,1009,1010,1013"}, function (cdata) {
								$type.innerHTML = util.selectBuffer({"list":cdata.data,"key":"1001"});
								cparam.form.render();
								var sresult = [];
								for(var i= 0,len = cdata.data.length;i<len;i++){
									var obj = cdata.data[i];
									if(obj.dictTypeCode == 1005 && obj.dictdataCode == -1) continue;
									sresult.push(obj);
								}
								cdata.data = sresult;
								
								var execuFun = function(list,key){
                                   var result = [];
                                   for(var i =0,len= list.length;i<len;i++){
                                   	var obj = list[i];
                                   
                                   	if(obj.dictTypeCode == key) result[obj.dictdataCode] = obj.dictdataName; 
                                   }
                                   return result;
                                };   
                                FunUtil.memory = {
                                	 "data":cdata.data,
                                	"1001":execuFun(cdata.data,"1001"),
                                	"1002":execuFun(cdata.data,"1002"),
                                	"1004":execuFun(cdata.data,"1004"),
                                	"1005":execuFun(cdata.data,"1005"),
                                	"1008":execuFun(cdata.data,"1008"),
                                	"1009":execuFun(cdata.data,"1009"),
                                	"1010":execuFun(cdata.data,"1010"),
                                	"1013":execuFun(cdata.data,"1013"),
                                };
								
								
								$this.data.layparam = cparam;
						        cparam.form.on('submit(admin-company-query-btn)', function (data) {
                                    request.ntqCompany.query(Object.assign($this.data.form, data.field), function (cdata) {
                                       
                                        $this.data.totalPage = cdata.totalPage;
                                        if($this.data.form.pageNo == 1) $this.fun4page(cdata);
                                
                                    })
                                    return false;
                                });
								
								setTimeout(function(){
									$query.click();
								},1000);
                             
                            });
						});
						
                    },

                    fun4search: function () {
                        var $this = this;
						 
                    },
                    fun4page:function(data){
                        var $this = this;
                        util.layout(function(cparam){

                            cparam.laypage({cont: 'admin-company-body-page' , pages: $this.data.totalPage , skip: true,jump: function (obj, first) {
                                $this.data.form.pageNo = obj.curr;
                                 if(String.HasText(data)){ $this.fun4table(data);data = ""; return;}
                                 request.ntqCompany.query($this.data.form, function (cdata) {
                                     $this.fun4table(cdata);
                                 });

                                return false;
                            }});
                        });


                    },

                    fun4table: function (cdata) {
                        var $table = $("#admin-company-table");
                        var $this = this;


                        $table.html(HtmUtil.table(cdata.results));
                        console.log(cdata);

                        $("button.admin-company-btn-edit").unbind("click").bind("click", function () {
                            var $self = this;
                            var id = $self.getAttribute("data-id");
							if($self.getAttribute("class").indexOf("layui-btn-disabled") > 0) return;

                            request.ntqCompany.get({"id":id}, function (cdata) {
                                layer.open({  type: 1,   content: HtmUtil.update(cdata),  area: ['500px', '600px'], skin: 'layui-layer-demo',  success: function (layero, index) {
                                    
									
									setTimeout(function(){
								    	 
								    		var $type  = document.getElementById("common-select-1001");// 
								            var $qual  = document.getElementById("common-select-1002");// 
								            var $htype  = document.getElementById("common-select-1009");// 
								            var $stype  = document.getElementById("common-select-1010");// 
								    		 
								    		console.log("============");
								    		
								    		var nlist = [];
                                    	    for(var i =0,len = FunUtil.memory['data'].length;i<len;i++){ var sobj = FunUtil.memory['data'][i]; if(sobj.dictdataName != "全部") nlist.push(sobj); }
                                    	    
								    		
								    		$htype.innerHTML  =  util.selectBuffer({"list":FunUtil.memory['data'],"key":"1009","select":cdata.data.industryType});
								    		$stype.innerHTML  =  util.selectBuffer({"list":FunUtil.memory['data'],"key":"1010","select":cdata.data.scale});
								    		
                                        	$type.innerHTML  =  util.selectBuffer({"list":nlist,"key":"1001","select":cdata.data.companyType});
                                        	$qual.innerHTML  =  util.selectBuffer({"list":FunUtil.memory['data'],"key":"1002","select":cdata.data.financingType});
                                        	
                                        	var sobj = cdata.data;
                                        	
                                        	util.editer({"id":"admin-company-update-companyBenefit",value:sobj.companyBenefit});
											util.editer({"id":"admin-company-update-companySynopsis",value:sobj.companySynopsis})
										
                                        	
                                        	$this.util4city({"province":sobj.provinceOfCompanyCode,"city":sobj.cityOfCompanyCode,"area":sobj.locationOfCompanyCode,"callback":function(cparam){

                                                var shortUrl = "";
                                                cparam.upload({
                                                    elem:"#admin-company-update-pic",
                                                    url: request.ntqProvider.ntqUpload(), //上传接口
                                                    success: function(res){ //上传成功后的回调
                                                        shortUrl = res.data.shortUrl;
                                                        $("#admin-company-update-img").attr("src",shortUrl);
                                                        console.log(shortUrl)
                                                    }
                                                });

                                        	    cparam.form.on('submit(admin-company-update-btn)', function (data) {
                                                    request.ntqCompany.update(Object.assign({thumbUrl:shortUrl},data.field), function (cdata) {
                                                        layer.close(index);
                                                        $query.click();
                                                    });
                                                    return false;
                                                });
                                        	}});
								    
								    	
								    },300);
									
								 
									
								 
                                }});
							});	

                             
							
							 
                        });



                        //add -hr
                        $("button.admin-company-btn-addHR").unbind("click").bind("click", function () {

                            var $self = this;
                            var sid = $self.getAttribute("data-id");


                            layer.open({  type: 1,   content: HtmUtil.addHR(""),  area: ['480px', '378px'], skin: 'layui-layer-demo',  success: function (layero, index) {
                                util.layout(function(cparam){

                                    cparam.form.on('submit(admin-company-addHR-btn)', function (data) {
                                        console.log(data);

                                        var param = data.field;
                                        param.companyBaseInfoId = sid;

                                        request.ntqCompanyContactor.add(param, function (cdata) {
                                            layer.close(index);
                                            console.log(cdata);
											
											 request.ntqCompany.query($this.data.form, function (cdcata) {
                                                $this.fun4table(cdcata);  
											 });
											
                                        });
                                        return false;
                                    });
                                });
                            }});


                        });



                        $("button.admin-company-btn-addposition").unbind("click").bind("click", function () {

                            var $self = this;
                            var id = $self.getAttribute("data-id");
                            
                            if($self.getAttribute("class").indexOf("layui-btn-disabled") > -1) return;

                            layer.open({  type: 1,   content: HtmUtil.addPosition(""),  area: ['480px', '378px'], skin: 'layui-layer-demo',  success: function (layero, index) {
                                setTimeout(function(){
									 
									 
										var $type  = document.getElementById("common-select-1004");//职位类型
								        var $qual  = document.getElementById("common-select-1005");//学历要求
							            var $work  = document.getElementById("common-select-1008");//学历要求
							            var $stype = document.getElementById("common-select-1013");//学历要求
							            
							            // console.log($("#admin-company-addposition-company1").siblings("div"));
							            
                                        // $("#admin-company-addposition-company1").siblings("div").unbind("click").bind("click",function(){
                                	    // 	$("#admin-company-addposition-area1").hide();
                                	    // 	$("#admin-company-addposition-area2").hide();
                                	    //
                                	    // });
                                	    
                                	    // $("#admin-company-addposition-company2").siblings("div").unbind("click").bind("click",function(){
                                	    // 	$("#admin-company-addposition-area1").show();
                                	    // 	$("#admin-company-addposition-area2").show();
                                	    // });
							            
							            
							            $work.innerHTML  =  util.selectBuffer({"list":FunUtil.memory['data'],"key":"1008"});
                                    	$type.innerHTML  =  util.selectBuffer({"list":FunUtil.memory['data'],"key":"1004"});
                                    	$qual.innerHTML  =  util.selectBuffer({"list":FunUtil.memory['data'],"key":"1005"});
                                    	$stype.innerHTML =  util.selectBuffer({"list":FunUtil.memory['data'],"key":"1013"});
										
										util.editer({"id":"admin-company-addPosition-positionDesc"});
										util.editer({"id":"admin-company-addPosition-positionRequirements"})
										
										
									    $this.util4city({"province":"","city":"","area":"","callback":function(cparam){
									    	cparam.form.render();
									        cparam.form.on('checkbox(admin-company-add-position-isDiscussPersonally)', function(data){
                                              if(data.elem.checked){
                                              	document.getElementById("admin-company-add-position-lowSalary").setAttribute("disabled","");
                                              	document.getElementById("admin-company-add-position-highSalary").setAttribute("disabled",true);
                                              }else{
                                                document.getElementById("admin-company-add-position-lowSalary").removeAttribute("disabled");
                                              	document.getElementById("admin-company-add-position-highSalary").removeAttribute("disabled");
                                              }
                                            });
									    	
                                        	cparam.form.on('submit(admin-company-addposition-btn)', function (data) {
                                        		console.log("=======")
                                        		console.log(data);
                                            
                                                var param = data.field;
                                                param.isDiscussPersonally = param.isDiscussPersonally == "on" ? "1" : "2";
                                                param.companyBaseInfoId   = id;
                                                param.isUnlimited         = param.isUnlimited == "on" ? "1" : "2";
                                                param.highWorkingLife     = "11";
                                                param.workProvinceCode    = param.provinceOfCompanyCode ;
                                                param.workLocationCode    = param.locationOfCompanyCode;
                                                param.workCityCode        = param.cityOfCompanyCode ;
                                                
                                                delete param.provinceOfCompanyCode;
                                                delete param.locationOfCompanyCode;
                                                delete param.cityOfCompanyCode;
                                                
                                                if(parseFloat(param.recruitingNumbers) < 0) {cparam.layer.msg("招聘人数不能为负"); cparam.form.render(); return false;}
                                                if(parseFloat(param.positionDeadline) < 0) {cparam.layer.msg("职位有效期不能为负"); cparam.form.render(); return false;}
 
                                                if( param.isDiscussPersonally == "2"  ) {
                                                	if(!(String.HasText(param.lowSalary) &&String.HasText(param.highSalary)) ) {
                                                		cparam.layer.msg("薪资不能为空");
                                                		return false;
                                                	}
                                                	
                                                	
                                                	if((parseFloat(param.lowSalary) > parseFloat(param.highSalary)) ) {
                                                		cparam.layer.msg("最低薪资不能高于 最高薪资");
                                                		cparam.form.render();
                                                		return false;
                                                	}
                                                }
 
                                                
                                                request.ntqCompanyPosition.add(param, function (cdata) {
                                                    layer.close(index);
                                                    $query.click();
                                                });
                                                return false;
                                            });
                                        }});
                                        
                                        //获取Hr 列表
                                        $this.util4hr({"id":id,"key":"","callback":function(){   }});
										 
									
								},300);
								
								 
                            }});


                        });

                        $("button.admin-company-btn-position").unbind("click").bind("click", function () {
                            var $self = this;
                            var id = $self.getAttribute("data-id");
							var fun4search  = function(dparam){
								
								var fun4evet = function(){
									  $("button.admin-company-addposition-edit-btn").unbind("click").bind("click", function () {
                                    
                                                var $pself = this;
                                                var id = $pself.getAttribute("data-id");
                                                
                                                if($pself.className.indexOf("layui-btn-disabled") > -1) return;
												
												
							                    var $type = document.getElementById("admin-company-form-companyType");
												
                                                request.ntqCompanyPosition.get({"id":id}, function (dddata) {
                                                	
                                                	 var companyBaseInfoId =dddata.data.companyBaseInfoId
                                                	  
                                                    layer.open({  type: 1,   content: HtmUtil.updatePosition(dddata),  area: ['480px', '378px'], skin: 'layui-layer-demo',  success: function (layero, index) {
                                                        
                                                        var sobj = dddata.data; 
                                                        var hasRequest = false;
                                                        
                                                        
                                                        
                                                        $this.util4city({"province":sobj.workProvinceCode,"city":sobj.workCityCode,"area":sobj.workLocationCode,"callback":function(cparam){
                                        	            	 
                                        	            	 
                                        	            	 
                                        	            	 
                                        	            	   cparam.form.on('checkbox(admin-company-add-position-isDiscussPersonally)', function(data){
                                                                 if(data.elem.checked){
                                                                 	document.getElementById("admin-company-add-position-lowSalary").setAttribute("disabled","");
                                                                 	document.getElementById("admin-company-add-position-highSalary").setAttribute("disabled",true);
                                                                 }else{
                                                                   document.getElementById("admin-company-add-position-lowSalary").removeAttribute("disabled");
                                                                 	document.getElementById("admin-company-add-position-highSalary").removeAttribute("disabled");
                                                                 }
                                                               });
                                        	            	 
                                        	            	 cparam.form.on('submit(admin-company-updateposition-btn)', function (data) {
                                                                 console.log("=======")
                                                                 console.log(data);
                                                                var param = data.field;
                                                                
                                                                param.isDiscussPersonally = param.isDiscussPersonally == "on" ? "1" : "2";
                                                                param.isUnlimited = param.isUnlimited == "on" ? "1" : "2";
                                                                param.companyBaseInfoId = companyBaseInfoId;
                                                                param.positionDesc  =param.positionDesc;//.replace(/\"/g, "")
                                                                param.positionRequirements  = param.positionRequirements;//.replace(/\"/g, "")
                                                                
                                                                if(parseFloat(param.recruitingNumbers) < 0) {cparam.layer.msg("招聘人数不能为负"); cparam.form.render(); return false;}
                                                                if(parseFloat(param.positionDeadline) < 0) {cparam.layer.msg("职位有效期不能为负"); cparam.form.render(); return false;}
                                                                
                                                                if( param.isDiscussPersonally == "2"  ) {
                                                                	if(!(String.HasText(param.lowSalary) &&String.HasText(param.highSalary)) ) {
                                                                		
                                                                		cparam.layer.msg("薪资不能为空");
                                                                		return false;
                                                                	}
                                                                	
                                                                	if((parseFloat(param.lowSalary) > parseFloat(param.highSalary)) ){
                                                                		
                                                                		cparam.layer.msg("最低薪资不能高于 最高薪资");
                                                                		cparam.form.render();
                                                                		return false;
                                                                	}
                                                                }
                                                                
                                                                
                                                                
                                                                if(hasRequest) return;
                                                                hasRequest = true;
                                    
                                                                request.ntqCompanyPosition.update(param, function (cdata) {
																	
																   layer.close(index);
																   
                                                                   fun4search("s");
                                                                   return;
                                                                });
                                                                return false;
                                                            });
                                        	            }});
                                                        
                                                        $this.util4hr({"id":sobj.companyBaseInfoId,"key":sobj.companyContractorId,"callback":function(){}});
                                                        
							                    	
							                                var $type  = document.getElementById("common-select-1004");//职位类型
								                            var $qual  = document.getElementById("common-select-1005");//学历要求
								                            var $work  = document.getElementById("common-select-1008");//职位类型
							                                var $stype  = document.getElementById("common-select-1013");//专场类型
							               
                    							            $work.innerHTML   =  util.selectBuffer({"list":FunUtil.memory['data'],"key":"1008","select":sobj.lowWorkingLife});
                                    	                    $type.innerHTML   =  util.selectBuffer({"list":FunUtil.memory['data'],"key":"1004","select":sobj.positionType});
                                    	                    $qual.innerHTML   =  util.selectBuffer({"list":FunUtil.memory['data'],"key":"1005","select":sobj.qualificationsType});
										                    $stype.innerHTML  =  util.selectBuffer({"list":FunUtil.memory['data'],"key":"1013","select":sobj.specialPerformanceType});
										                    
										                    
															util.editer({"id":"admin-company-updatePosition-positionDesc",value:sobj.positionDesc});
															util.editer({"id":"admin-company-updatePosition-positionRequirements",value:sobj.positionRequirements})
										
										                    
							                    	      /*  util.layout(function(cparam){
							                    	           	$this.fun4search();
							                    	               $query.click();
                                                            
                                                            }); 
                                                 */
                                                    
                                                    }});
                                                });
                                    
                                            });
                                    
                                            $("button.admin-company-addposition-status-btn").unbind("click").bind("click", function () {
                                    
                                                var $pself    = this;
                                                var id        = $pself.getAttribute("data-id");
                                                var isDisable = $pself.getAttribute("data-isDisable");
                                                isDisable     = (String.HasText(isDisable) && isDisable == 1 ? "0" : "1");
                                    
                                                request.ntqCompanyPosition.changeStatus({"companyPositionId":id,"status":isDisable}, function (dddata) {
                                                   
												   
												   fun4search("s");
                                    
                                                });
                                    
                                    
                                            });
                                    
									
								};
								
								request.ntqCompanyPosition.query({"companyBaseInfoId":id,"pageSize":100, "pageNum":1}, function (cdata) {
									var $tbody = document.getElementById("admin-company-addposition-tbody");
									
                                    if(String.HasText(dparam)){
										if(!(cdata.results instanceof Array)) cdata.results = [];
										 
										$tbody.innerHTML = (HtmUtil.tablePositionRow(cdata.results));
										
										fun4evet();
										
									}else{
										
									    layer.open({  type: 1, title:false,  content: HtmUtil.tablePosition(cdata),  area: ['1050px', '400px'], skin: 'layui-layer-demo',  success: function (layero, index) {
                                            util.layout(function(cparam){
                                        
                                                fun4evet();
                                            });
                                        }});
										
									}
                                    
                                  

                                });
							};

                            fun4search();
                             
                        });



                        $("button.admin-company-btn-HR").unbind("click").bind("click", function () {
                            var $self = this;
                            var id    = $self.getAttribute("data-id");
                            var sid   = id;
							if($self.getAttribute("class").indexOf("layui-btn-disabled") > 0) return;
							
							var fun4search = function(dparam){
								
								var fun4evet = function(){
									
									   $("button.admin-company-hr-del-btn").unbind("click").bind("click", function () {

                                            var $pself = this;
                                            var id = $pself.getAttribute("data-id");

                                            request.ntqCompanyContactor.delete({"id": id}, function (dddata) {
                                               
											   fun4search("s");
											    
                                            });
                                        });
 
                                        $("button.admin-company-hr-edit-btn").unbind("click").bind("click", function () {

                                            var $pself = this;
                                            var id = $pself.getAttribute("data-id");

                                            request.ntqCompanyContactor.get({"id":id}, function (dddata) {
                                                layer.open({  type: 1,   content: HtmUtil.updateHR(dddata),  area: ['480px', '378px'], skin: 'layui-layer-demo',  success: function (layero, index) {
                                                    util.layout(function(cparam){

                                                        cparam.form.on('submit(admin-company-updateHR-btn)', function (data) {
                                                            console.log(data);

                                                            var param = data.field;

                                                            param.companyBaseInfoId = sid;

                                                            request.ntqCompanyContactor.update(param, function (cdata) {
                                                               layer.close(index);
                                                               fun4search("s");
                                                            });
                                                            return false;
                                                        });
                                                    });
                                                }});
                                            });
 
                                        });
 
								};
								
								request.ntqCompanyContactor.query({"id":id,"pageSize":1000, "pageNum":1}, function (cdata) {
									
									var $tbody = document.getElementById("admin-company-addhr-tbody");
									
                                    if(String.HasText(dparam)){
										if(!(cdata.results instanceof Array)) cdata.results = [];
										
										console.log(cdata);
										 
										$tbody.innerHTML = (HtmUtil.tableHrRow(cdata.data));
										
										fun4evet();
										
									}else{
										
									    layer.open({  type: 1, title:false,  content: HtmUtil.tableHr(cdata),  area: ['780px', '378px'], skin: 'layui-layer-demo',  success: function (layero, index) {
                                            util.layout(function(cparam){
										    	 fun4evet();
                                            });
                                        }});
										
									}
                                    
                                  


                                    

                               });

							};
							
							fun4search();


                           

                        });






                        $("button.admin-company-btn-forbid").unbind("click").bind("click", function () {
                            var $self = this;
                            var id = $self.getAttribute("data-id");
                            var isValid = $self.getAttribute("data-isValid");
							if($self.getAttribute("class").indexOf("layui-btn-disabled") > 0) return;
							
							
						    layer.confirm('确定操作？', {btn: ['确定','取消'] }, function(){
								
								
								
								request.ntqCompany.deletes({"id":id,"status":isValid}, function (cdata) {
							    	$query.click();
									layer.closeAll();
                                });

							}, function(){ });
 
                        });

                    },


                };
                Help.fun4start();


            };

            return Page;

        };

        return PageObj;
    }
});
